import constant.Constant;
import util.ConfigLoader;
import util.tools.CommonTools;

/**
 * Created by chenkuo on 2018/1/30.
 */
public class YAGlobal {
    public static void main(String[] args) throws Throwable {
        System.out.println("*****************");
        String[] args1 = new String[11];
        args1[0] = "-g";
        args1[1] = "test_achieve";
        args1[2] = "-p";
        args1[3] = "html:target/cucumber";
        args1[4] = "-p";
        args1[5] = "rerun:target/rerun.txt";
        args1[6] = "-t";
        args1[7] = "@0613";
        args1[8] = "classpath:feature";
        args1[9] = "-evn";
        args1[10] = "sstable";
        String mode = null;
        String[] parms = new String[args1.length-2];

        for(int i=0;i<args1.length;i++){
            if(args1[i].equals("-evn")){
                mode = args1[++i];
                break;
            }
            parms[i] = args1[i];
        }
        for (int i = 0; i <args1.length -2 ; i++) {
            Constant.runParms.add(parms[i]);
            System.out.println("参数："+parms[i]);
        }
        ConfigLoader.load(mode+".properties");
        cucumber.api.cli.Main.main(parms);
//        CommonTools.runAuto(parms);

    }
}

